package com.a0soft.gphone.aTruffleHog.di;
/*
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 3, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * Copyright(C) 2011 
 *   Sam Lu <ysl.sam.lu (at) gmail.com>
 *
 */

import com.a0soft.gphone.aTruffleHog.util.CONSTS;
import com.a0soft.gphone.aTruffleHog.util.MiscUtil;
import com.a0soft.gphone.aTruffleHog.util.aSystemProperties;

import android.text.TextUtils;

class BaseInfo {
    protected static void 
    PutSysPropStr(DeviceInfo di, String strINK,
                  String strFieldName, String strProp)
    {
        Class<?> cls = android.os.Build.class;
        String str = MiscUtil.GetClassStringField(cls, null, strFieldName);
        if (TextUtils.isEmpty(str) || str.equals(CONSTS.UNKNOWN))
            str = aSystemProperties.Get(strProp);
        di.Put(strINK, str);
    }
}
